﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlTypes;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SupplyChain.Domain.Entities
{
    /// <summary>
    /// 销售合同类
    /// </summary>
    public class CustomerOrder : EntityBase
    {
        /// <summary>
        /// 合同编号
        /// </summary>
        public string? ContractCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        public string? CustomerName { get; set; }

        /// <summary>
        /// 签约日期
        /// </summary>
        public string? SigningDate { get; set; }

        /// <summary>
        /// 起始日期
        /// </summary>
        public DateTime? StartDate { get; set; }

        /// <summary>
        /// 截止日期
        /// </summary>
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 合同类别
        /// </summary>
        public int? ContractType { get; set; }

        /// <summary>
        /// 销售人员
        /// </summary>
        public string? SalesPerson { get; set; }

        /// <summary>
        /// 制单人员
        /// </summary>
        public string? OrderCreator { get; set; }

        /// <summary>
        /// 制单日期
        /// </summary>
        public DateTime? OrderDate { get; set; }

        /// <summary>
        /// 收货人
        /// </summary>
        public string? Consignee { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        public string? PhoneNumber { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string? DetailedAddress { get; set; }

        /// <summary>
        /// 合同总金额
        /// </summary>
        public decimal? TotalAmount { get; set; }

        /// <summary>
        /// 合同总数量
        /// </summary>
        public decimal? TotalQuantity { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        [SugarColumn(IsIgnore = true)]
        public List<ContractDetails>? Details { get; set; }
    }
}
